﻿@{
    ViewBag.Title = "值班表管理";
    Layout = "~/Views/Shared/_LayoutBase.cshtml";
}
@section styles{
    <link href="/Content/css/common/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <link href="/Content/css/common/animate/animate.min.css" rel="stylesheet" />
    <link href="/Content/css/common/iCheck/custom.css" rel="stylesheet">
    <link href="/Content/css/common/fullcalendar/fullcalendar.min.css" rel="stylesheet">
    <link href="/Content/css/common/fullcalendar/fullcalendar.print.min.css" rel="stylesheet">
    <link href="/Content/css/common/style.css" rel="stylesheet">
}
<div id="dMain">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox" style="margin-bottom: 0px;">
            <div class="ibox-title">
                <h4>值班表管理</h4>
            </div>
            <div class="ibox-content">
                <div id="toolbar" style="margin-bottom:5px;">
                    <a class="btn btn-sm btn-success radius" onclick="parent.createTab('f32','值班管理','@Url.Action("Paiban","Attend",new { area="Common" })')" style="margin-top: 10px;"><i class="iconfont icon-xitongguanli"></i>&nbsp; 值班管理</a>
                    <a class="btn btn-sm btn-success radius" onclick="parent.createTab('3201','新建排班表','@Url.Action("PaibanEdit","Attend",new { area="Common" })')" style="margin-top: 10px;"><i class="iconfont icon-tianjia"></i>&nbsp; 新建排班表</a>
                </div>
                <div id="calendar" class="fc fc-ltr">
                    @*<table class="fc-header" style="width:100%"><tbody><tr><td class="fc-header-left"><span class="fc-button fc-button-prev fc-state-default fc-corner-left" unselectable="on"><span class="fc-text-arrow">‹</span></span><span class="fc-button fc-button-next fc-state-default fc-corner-right" unselectable="on"><span class="fc-text-arrow">›</span></span></td><td class="fc-header-center"><span class="fc-header-title"><h2>十月 2018</h2></span></td><td class="fc-header-right"><span class="fc-button fc-button-month fc-state-default fc-corner-left fc-state-active" unselectable="on">月</span><span class="fc-button fc-button-agendaWeek fc-state-default" unselectable="on">周</span><span class="fc-button fc-button-agendaDay fc-state-default fc-corner-right" unselectable="on">天</span></td></tr></tbody></table><div class="fc-content" style="position: relative;"><div class="fc-view fc-view-month fc-grid" style="position:relative" unselectable="on"><div class="fc-event-container" style="position:absolute;z-index:8;top:0;left:0"><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 317.667px; width: 74px; top: 40px;"><div class="fc-event-inner"><span class="fc-event-title">日事件</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-end" style="position: absolute; left: 1px; width: 233.333px; top: 40px;"><div class="fc-event-inner"><span class="fc-event-title">长事件</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 81.6667px; width: 74px; top: 66px;"><div class="fc-event-inner"><span class="fc-event-time">4p</span><span class="fc-event-title">重复事件</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 81.6667px; width: 74px; top: 140.333px;"><div class="fc-event-inner"><span class="fc-event-time">4p</span><span class="fc-event-title">重复事件</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 317.667px; width: 74px; top: 66px;"><div class="fc-event-inner"><span class="fc-event-time">10:30a</span><span class="fc-event-title">会议</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 317.667px; width: 74px; top: 92px;"><div class="fc-event-inner"><span class="fc-event-time">12p</span><span class="fc-event-title">午餐</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><div class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 396.333px; width: 74px; top: 40px;"><div class="fc-event-inner"><span class="fc-event-time">7p</span><span class="fc-event-title">生日</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></div><a href="http://baidu.com/" class="fc-event fc-event-hori fc-event-draggable fc-event-start fc-event-end" style="position: absolute; left: 239px; width: 152.667px; top: 336.333px;"><div class="fc-event-inner"><span class="fc-event-title">打开百度</span></div><div class="ui-resizable-handle ui-resizable-e">&nbsp;&nbsp;&nbsp;</div></a></div><table class="fc-border-separate" style="width:100%" cellspacing="0"><thead><tr class="fc-first fc-last"><th class="fc-day-header fc-日 fc-widget-header fc-first" style="width: 79px;">日</th><th class="fc-day-header fc-一 fc-widget-header" style="width: 79px;">一</th><th class="fc-day-header fc-二 fc-widget-header" style="width: 79px;">二</th><th class="fc-day-header fc-三 fc-widget-header" style="width: 79px;">三</th><th class="fc-day-header fc-四 fc-widget-header" style="width: 79px;">四</th><th class="fc-day-header fc-五 fc-widget-header" style="width: 79px;">五</th><th class="fc-day-header fc-六 fc-widget-header fc-last">六</th></tr></thead><tbody><tr class="fc-week fc-first"><td class="fc-day fc-日 fc-widget-content fc-other-month fc-past fc-first" data-date="2018-10-28"><div style="min-height: 65px;"><div class="fc-day-number">28</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-other-month fc-past" data-date="2018-10-29"><div><div class="fc-day-number">29</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-other-month fc-past" data-date="2018-10-30"><div><div class="fc-day-number">30</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-other-month fc-past" data-date="2018-10-31"><div><div class="fc-day-number">31</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-today fc-state-highlight" data-date="2018-11-01"><div><div class="fc-day-number">1</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-future" data-date="2018-11-02"><div><div class="fc-day-number">2</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-future fc-last" data-date="2018-11-03"><div><div class="fc-day-number">3</div><div class="fc-day-content"><div style="position: relative; height: 78px;">&nbsp;</div></div></div></td></tr><tr class="fc-week"><td class="fc-day fc-日 fc-widget-content fc-future fc-first" data-date="2018-11-04"><div style="min-height: 64px;"><div class="fc-day-number">4</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-future" data-date="2018-11-05"><div><div class="fc-day-number">5</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-future" data-date="2018-11-06"><div><div class="fc-day-number">6</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-future" data-date="2018-11-07"><div><div class="fc-day-number">7</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-future" data-date="2018-11-08"><div><div class="fc-day-number">8</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-future" data-date="2018-11-09"><div><div class="fc-day-number">9</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-future fc-last" data-date="2018-11-10"><div><div class="fc-day-number">10</div><div class="fc-day-content"><div style="position: relative; height: 42px;">&nbsp;</div></div></div></td></tr><tr class="fc-week"><td class="fc-day fc-日 fc-widget-content fc-future fc-first" data-date="2018-11-11"><div style="min-height: 64px;"><div class="fc-day-number">11</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-future" data-date="2018-11-12"><div><div class="fc-day-number">12</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-future" data-date="2018-11-13"><div><div class="fc-day-number">13</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-future" data-date="2018-11-14"><div><div class="fc-day-number">14</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-future" data-date="2018-11-15"><div><div class="fc-day-number">15</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-future" data-date="2018-11-16"><div><div class="fc-day-number">16</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-future fc-last" data-date="2018-11-17"><div><div class="fc-day-number">17</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td></tr><tr class="fc-week"><td class="fc-day fc-日 fc-widget-content fc-future fc-first" data-date="2018-11-18"><div style="min-height: 64px;"><div class="fc-day-number">18</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-future" data-date="2018-11-19"><div><div class="fc-day-number">19</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-future" data-date="2018-11-20"><div><div class="fc-day-number">20</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-future" data-date="2018-11-21"><div><div class="fc-day-number">21</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-future" data-date="2018-11-22"><div><div class="fc-day-number">22</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-future" data-date="2018-11-23"><div><div class="fc-day-number">23</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-future fc-last" data-date="2018-11-24"><div><div class="fc-day-number">24</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td></tr><tr class="fc-week"><td class="fc-day fc-日 fc-widget-content fc-future fc-first" data-date="2018-11-25"><div style="min-height: 64px;"><div class="fc-day-number">25</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-future" data-date="2018-11-26"><div><div class="fc-day-number">26</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-future" data-date="2018-11-27"><div><div class="fc-day-number">27</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-future" data-date="2018-11-28"><div><div class="fc-day-number">28</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-future" data-date="2018-11-29"><div><div class="fc-day-number">29</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-future" data-date="2018-11-30"><div><div class="fc-day-number">30</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-other-month fc-future fc-last" data-date="2018-12-01"><div><div class="fc-day-number">1</div><div class="fc-day-content"><div style="position: relative; height: 26px;">&nbsp;</div></div></div></td></tr><tr class="fc-week fc-last"><td class="fc-day fc-日 fc-widget-content fc-other-month fc-future fc-first" data-date="2018-12-02"><div style="min-height: 66px;"><div class="fc-day-number">2</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-一 fc-widget-content fc-other-month fc-future" data-date="2018-12-03"><div><div class="fc-day-number">3</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-二 fc-widget-content fc-other-month fc-future" data-date="2018-12-04"><div><div class="fc-day-number">4</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-三 fc-widget-content fc-other-month fc-future" data-date="2018-12-05"><div><div class="fc-day-number">5</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-四 fc-widget-content fc-other-month fc-future" data-date="2018-12-06"><div><div class="fc-day-number">6</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-五 fc-widget-content fc-other-month fc-future" data-date="2018-12-07"><div><div class="fc-day-number">7</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td><td class="fc-day fc-六 fc-widget-content fc-other-month fc-future fc-last" data-date="2018-12-08"><div><div class="fc-day-number">8</div><div class="fc-day-content"><div style="position: relative; height: 0px;">&nbsp;</div></div></div></td></tr></tbody></table></div></div>*@
                </div>
            </div>
        </div>
    </div>
</div>

@section scripts{
    <script src="/Content/js/common/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/Content/js/common/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="/Content/js/common/bootstrap-table/bootstrap-table-export.js"></script>
    <script src="/Content/js/common/bootstrap-table/tableExport.js"></script>
    <script src="/Content/js/common/bootstrap-table/bootstrap-table-cookie.js"></script>
    <script src="/Content/js/common/from.js"></script>
    <script src="/Content/js/common/content.js"></script>
    <script src="/Content/js/common/jquery-ui.custom.min.js"></script>
    <script src="/Content/js/common/icheck.min.js"></script>
    <script src="/Content/js/common/fullcalendar/fullcalendar.min.js"></script>

    <script>
        $(document).ready(function () {

            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });

            $('#external-events div.external-event').each(function () {
                var eventObject = {
                    title: $.trim($(this).text())
                };

                $(this).data('eventObject', eventObject);

                $(this).draggable({
                    zIndex: 999,
                    revert: true,
                    revertDuration: 0
                });

            });

            var date = new Date();
            var d = date.getDate();
            var m = date.getMonth();
            var y = date.getFullYear();

            $('#calendar').fullCalendar({
                header: {
                    left: 'prev,next',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                editable: true,
                droppable: true,
                drop: function (date, allDay) {
                    var originalEventObject = $(this).data('eventObject');

                    var copiedEventObject = $.extend({}, originalEventObject);

                    copiedEventObject.start = date;
                    copiedEventObject.allDay = allDay;

                    $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
                },
                events: {
                    url: '/Common/Attend/GetPaibanCalendarResult',
                    cache: true
                }
            });
        });
    </script>
}